<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateMallSettleInShopInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mall_settle_in_shop_info', function (Blueprint $table) {
            $table->id();
            $table->string('mallId', 24)->default('')->comment('商场ID');
            $table->string('mallName', 120)->default('')->comment('商城名称');
            $table->string('province', 24)->default('')->comment('省');
            $table->string('city', 24)->default('')->comment('市');
            $table->string('address', 255)->default('')->comment('地址');
            $table->decimal('lng', 9, 6)->default(0)->comment('经度');
            $table->decimal('lat', 9, 6)->default(0)->comment('纬度');
            $table->string('storeId', 24)->default('')->comment('店铺ID');
            $table->string('storeName', 120)->default('')->comment('店铺名称');
            $table->string('branchStore', 120)->default('')->comment('分店');
            $table->string('firstType', 8)->default('')->comment('一类');
            $table->string('secondType', 12)->default('')->comment('二类');
            $table->string('floor', 8)->default('')->comment('楼层');
            $table->string('businessCircle', 24)->default('')->comment('商圈');
            $table->unsignedInteger('price')->default(0)->comment('人均消费');
            $table->string('score', 50)->default('')->comment('评分');
            $table->decimal('star', 2, 1)->default(0)->comment('星级');
            $table->string('phone', 50)->default('')->comment('电话');
            $table->unsignedInteger('commentCount')->default(0)->comment('评论数');
            $table->unsignedInteger('status')->default(0)->comment('状态码');
            $table->string('statusText', 32)->default('')->comment('营业状态');
            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->index('mallId', 'idx_mallId');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '商场入驻表信息';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mall_settle_in_shop_info');
    }
}
